<?php
	echo validation_errors();
	echo form_open('teacher/edit_profile');
?>

Profile | <a href="/165-project/index.php/teacher/edit_profile/password">Change Password</a><br />

<?php
	$userid = $this->session->userdata("userid");
	$alldata_query = mysql_query("SELECT * FROM teachers WHERE userid='$userid'");
	$alldata = mysql_fetch_array($alldata_query);
?>

<h1>Teacher Profile</h1>
Last Name:<br />
<input type="text" name="lastname" value="<?php echo $alldata["lastname"]; ?>" /><br />
First Name:<br />
<input type="text" name="firstname" value="<?php echo $alldata["firstname"]; ?>" /><br />
Middle Name:<br />
<input type="text" name="middlename" value="<?php echo $alldata["middlename"]; ?>" /><br />
Sex: 
<?php if($alldata["sex"] == 'M'): ?>
	<input type="radio" name="sex" id="male" value="M" checked="checked" /> <label for="male">Male</label>
	<input type="radio" name="sex" id="female" value="F" /> <label for="female">Female</label><br />
<?php else: ?>
	<input type="radio" name="sex" id="male" value="M" /> <label for="male">Male</label>
	<input type="radio" name="sex" id="female" value="F" checked="checked" /> <label for="female">Female</label><br />
<?php endif ?>
<!--Utang ko pa yung birthday. May iniisip akong magandang javascript sa kanya eh.-->
Mobile Number:<br />
<input type="text" name="mobilenumber" value="<?php echo $alldata["mobilenumber"]; ?>" /><br />
Photo URL:<br />
<input type="text" name="photourl" value="<?php echo $alldata["photourl"]; ?>" /><br />
Academic Credentials:<br />
<textarea name="academiccredentials" rows="5" cols="64"><?php echo $alldata["academiccredentials"]; ?></textarea><br />

<?php echo form_submit('save', "Save"); //Hindi ko rin ito masyadong gets ?>
